<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCloaksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cloaks', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('type')->default('1')->nullable()->comment('类型 1安卓 2IOS');
            $table->string('device_number')->nullable()->comment('设备标识');
            $table->string('ip')->nullable()->comment('请求IP');
            $table->string('ip_address')->nullable()->comment('IP归属地');
            $table->tinyInteger('status')->default('0')->nullable()->comment('状态0 禁止 1开放');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cloaks');
    }
}
